import re

# 字符集 []

a = 'abc,acc,adc,aec,afc,ahc'

r = re.findall('a[cf]c', a)

print(r)

# ^不是
r2 = re.findall('a[^cf]c', a)

print(r2)


# c-f 从c到f
r3 = re.findall('a[c-f]c', a)

print(r3)
